import request from '@/utils/request'

// 查询居民列表
export function listResident(query) {
  return request({
    url: '/resident/resident/list',
    method: 'get',
    params: query
  })
}
// 查询居民列表详细列表
export function listResidentfirst(query) {
  return request({
    url: '/resident/resident/residentlist',
    method: 'get',
    params: query
  })
}
// 查询居民标签列表
export function getlablelist() {
  return request({
    url: '/resident/resident/getlable',
    method: 'get',
    
  })
}
//插入标签
export function settag(query) {
  return request({
    url: '/resident/resident/settag',
    method: 'post',
    params: query
  })
}
// 查询居民详细
export function getResident(id) {
  return request({
    url: '/resident/resident/' + id,
    method: 'get'
  })
}

// 新增居民
export function addResident(data) {
  return request({
    url: '/resident/resident',
    method: 'post',
    data: data
  })
}

// 修改居民
export function updateResident(data) {
  return request({
    url: '/resident/resident',
    method: 'put',
    data: data
  })
}

// 删除居民
export function delResident(id) {
  return request({
    url: '/resident/resident/' + id,
    method: 'delete'
  })
}
export function deletetags(query) {
  return request({
    url: '/resident/resident/deletetags',
    method: 'get',
    params:{userid:query}
  })
}


export function addtags(query) {
  return request({
    url: '/resident/resident/addtags',
    method: 'post',
  data:query
  })
}

export function getInfodetail(query) {
  return request({
    url: '/resident/resident/getInfodetail',
    method: 'get',
  params:{id:query}
  })
}
export function qianyue(query) {
  return request({
    url: '/resident/resident/qianyue',
    method: 'get',
  params:{id:query}
  })
}

export function contractlist(query) {
  return request({
    url: '/resident/resident/contractlist',
    method: 'get',
  params:{id:query}
  })
}
export function homeservicelist(query) {
  return request({
    url: '/resident/resident/homeservicelist',
    method: 'get',
  params:{id:query}
  })
}
export function getdataservice(query) {
  console.log('query传递的参数',query.start);
  return request({
    url: '/resident/resident/getdataservice',
    method: 'get',
    params:query
  })
}
export function getdataserviceitem(query) {
  console.log('query传递的参数',query.start);
  return request({
    url: '/resident/resident/getdataserviceitem',
    method: 'get',
    params:query
  })
}
export function getresidentage() {
  return request({
    url: '/resident/resident/getresidentage',
    method: 'get',

  })
}
export function getresidentculture() {
  return request({
    url: '/resident/resident/getresidentculture',
    method: 'get',

  })
}
export function getresidentsex() {
  return request({
    url: '/resident/resident/getresidentsex',
    method: 'get',

  })
}

export function getresidenttag() {
  return request({
    url: '/resident/resident/getresidenttag',
    method: 'get',

  })
}
export function getresidentservicepackageuse() {
  return request({
    url: '/resident/resident/getresidentservicepackageuse',
    method: 'get',

  })
}